package com.zhang.backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("family_trees")
public class FamilyTree {

    @TableId(value = "family_id", type = IdType.AUTO)
    private Long familyId;

    @TableField("user_id")
    private Long userId;

    // 【修正】将 "Name" 改为 "name"，与数据库列名保持一致和规范
    @TableField("name")
    private String name;

    @TableField("content_desc")
    private String contentDesc;

    @TableField("is_deleted")
    private Boolean isDeleted;

    @TableField("create_time")
    private LocalDateTime createTime;

    @TableField("update_time")
    private LocalDateTime updateTime;
}